<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        // 字面量
        // let obj1 = {
        //     // 键值对
        //     id: '001',
        //     name: '张三',
        //     age: 20,
        //     gender: '男'
        // };
        // // 构造函数
        // let obj2 = new Object();

        // console.log(obj1.name);
        // console.log(obj1['name']);


        // let student = {
        //     // 键值对
        //     id: '001',
        //     name: '张三',
        //     age: 20,
        //     gender: '男'
        // };

        // const keysArr = Object.keys(student);
        // console.log(keysArr);


        // for (let key in student) {
        //     console.log(student[key]);
        // }


        // let key = 'age';

        // console.log(student.key);
        // console.log(student[key]);



        // 新增
        // student.phone = "131111111";
        // // 修改
        // student.age = 18;

        // student['gender'] = "女";

        // delete student.age;
        // delete student['gender'];
        // console.log(student);

        let users = [
            { account: 'zhangsan', password: '123', money: 100 },
            { account: 'lisi', password: '456', money: 900 },
            { account: 'wangwu', password: '000', money: 200 },
        ]

        let students = [
            { id: '001', name: '张三', age: 20, gender: '男' },
            { id: '002', name: '张三', age: 20, gender: '男' },
            { id: '003', name: '张三', age: 20, gender: '男' },
            { id: '004', name: '张三', age: 20, gender: '男' },
        ]

    </script>
</body>

</html>